Dreamweaver Article

Implementing User Authentication


Table of Contents

  1. Introduction
  2. Setting Up The Site
  3. User Authentication as a Web Application
  4. Introducing Sessions and Session Variables
  5. Implementing Registration
  6. Implementing Log-on
  7. Enabling Sessions With Application.cfm (ColdFusion Only)
  8. Restricting Access to Pages
  9. Implementing Log Out

Implementing Log Out

Users may also want to log out. For example, imagine your site had confidential financial information, or other personal information. Enabling log out is easy in Dreamweaver, though users often need to close their browsers in addition to logging out to fully kill the session.

  1. Back in Dreamweaver, open secret.asp.

    This page already has some text on it about logging out, but it is not yet functional.

  2. Drag to select the words log out. Add a User Authentication > Log Out User server behavior.

    The access denied page in the browser

    Figure 12. The access denied page in the browser

    The Log Out User dialog box opens.

  3. In the Log Out User dialog box, verify that Link Clicked “Log Out” is selected in the Log Out When category. In the When Done Go To field, type logout.asp.

    The Log Out User dialog box

    Figure 13. The Log Out User dialog box

    Clicking this link redirects the user to logout.asp, and it also removes the current session from the server's memory.

    Unfortunately, since browsers often remember (the proper term is “cache”) the contents of recently visited pages, it is often possible for the user to press the Back button and access sensitive content again, even after logging out. Therefore, the user should also close the browser. Logging out and closing the browser ultimately ends the session. A note has been added to this effect on logout.asp.

  4. Repeat steps 1-3 with top_secret.asp.

    The login framework is now completely functional, from beginning to end. You can add as many pages as you want and restrict them by role as appropriate.